Skip to content

Conversation

erikhfj
Copy link
Member

@erikhfj erikhfj commented Nov 24, 2026

Closes #127

What was done

  • Cleared all 19 Dependabot / pnpm audit alerts (all were in dev/test dependencies; pnpm audit --prod was already 0):
    • Updated vite to ^8.3.8 (client/package.json) and vitest to ^4.1.12 (client/package.json, server/package.json).
    • Added targeted pnpm.overrides in root package.json for esbuild (>=0.25.0), minimatch@>=7.0.0 <11.0.1 (>=11.0.1, leaving ESLint's minimatch@3.1.5 untouched), undici (>=7.30.2 <8), and zod (>=4.6.6), and regenerated pnpm-lock.yaml.
  • Server hardening:
    • Defaulted server/src/index.ts to bind process.env.HOST ?? '127.0.0.1' so the API listens on loopback behind Apache/Vite unless explicitly overridden.
    • Enforced caps on search query length (200 chars) and filter array lengths (50 items each for genreIds, countries, decades, plus integer validation for decades) in server/src/search/search.ts and server/src/searchHistory.ts, returning clear GraphQLError messages.
    • Added unit tests in server/src/search/search.test.ts and server/src/searchHistory.test.ts, and logged the work in docs/AI-USAGE.md.

What was tested

  • pnpm audit: No known vulnerabilities found (0 alerts, down from 19).
  • pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build: all passed (0 lint warnings; client: 221 passed; server: 88 passed, 56 PostgreSQL-backed tests skipped locally without TEST_DATABASE_URL; largest client JS chunk: 391.06 kB).
  • Verified tsx (tsx -e) and drizzle-kit --version both work with the updated esbuild override.

@erikhfj erikhfj requested a review from a team as a code owner November 24, 2026 19:14
@erikhfj erikhfj self-assigned this Nov 24, 2026
Copy link
Member

@robertky robertky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. The API now defaults to loopback binding, search inputs have sensible size limits with tests, and the dependency updates address the reported development-dependency alerts. CI passed, and the changes fit the issue scope. Approved.

@robertky robertky merged commit 159c5dc into main Nov 24, 2026
3 checks passed
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve Dependabot dev alerts and harden API input/bind defaults
2 participants